#include "stdafx.h"
#include "Object.h"

Object::Object()
: m_pos_x(0), m_pos_y(0)
, m_spd_x(0), m_spd_y(0)
, m_acc_x(0), m_acc_y(0)
, acc_seted(false)
, layer(0)
{

}

Object::Object(float x, float y, int l)
: m_pos_x(x), m_pos_y(y)
, m_spd_x(0), m_spd_y(0)
, m_acc_x(0), m_acc_y(0)
, acc_seted(false)
, layer(l)
{

}

void Object::SetPos()
{
	m_pos_x += m_spd_x;
	m_pos_y -= m_spd_y;
}

void Object::SetAccX(float x)
{
	m_acc_x = x;
	acc_seted = true;
}

void Object::SetAccY(float y)
{
	m_acc_y = y;
	acc_seted = true;
}

void Object::SetSpdX(float x)
{
	m_spd_x = x;
}

void Object::SetSpdY(float y)
{
	m_spd_y = y;
}

void Object::SetPosX(float x)
{
	m_pos_x = x;
}

void Object::SetPosY(float y)
{
	m_pos_y = y;
}


float Object::GetPosX()
{
	return m_pos_x;
}

float Object::GetPosY()
{
	return m_pos_y;
}

float Object::GetSpdX()
{
	return m_spd_x;
}

float Object::GetAccX()
{
	return m_acc_x;
}

void Object::SetFlag(bool f)
{
	acc_seted = f;
}

bool Object::GetFlag()
{
	return acc_seted;
}

int Object::GetLayer()
{
	return layer;
}